package com.example.lawyer.interfaceservice;

import com.example.lawyer.databind.itemview.MessageListItemViewData;
import com.example.lawyer.interfacecallback.PageHomeCCallback;
import com.example.lawyer.interfacemethod.PageHomeCInter;

import java.util.ArrayList;
import java.util.List;

public class PageHomeCService implements PageHomeCInter {


    /***
     * 发起最近联系人请求
     */
    @Override
    public void RequestMesgList(PageHomeCCallback cCallback) {
        List<MessageListItemViewData> listItemViewData = new ArrayList<>();


        ///模拟数据
        for(int s=0;s<5;s++)
        {

            MessageListItemViewData viewData = new MessageListItemViewData();
            viewData.coverurl.set("https://5b0988e595225.cdn.sohucs.com/images/20200101/29ef13e29f844575b29d3ad2a971037e.jpeg");
            viewData.username.set("高成轩");
            viewData.isshow.set(true);
            viewData.msgtexts.set("我市一条测试数据哈哈哈哈");
            viewData.sendtime.set("8月17日");
            listItemViewData.add(viewData);
        }

        if(cCallback!=null)
        {
            cCallback.OnMessageList(listItemViewData);
        }


    }
}
